package com.ji.TestRedis.redis.subscribe;

import java.io.Serializable;

import org.springframework.data.redis.core.RedisTemplate;

public class RedisSubscribeDaoImpl implements RedisDao {
	private RedisTemplate<?, ?> redisTemplate;
	@Override
	public void sendMessage(String channel, Serializable message) {
		System.out.println("已经发送");
		redisTemplate.convertAndSend(channel, message);
	}

	public RedisTemplate<?, ?> getRedisTemplate() {
		return redisTemplate;
	}

	public void setRedisTemplate(RedisTemplate<?, ?> redisTemplate) {
		this.redisTemplate = redisTemplate;
	}
}